-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor/BAR-233] Dropdown 컴포넌트 수정 #58
Conversation
@@ -0,0 +1,68 @@ | |||
import { type RefObject, useEffect, useRef, useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmswl98
어떤 기준으로 위치를 결정하는걸까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
triggerRef 요소를 기준으로 targetRef 요소를 위치시킵니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셧습니다!!!
그 디자인 시스템에 Dialog로 되어 있는 부분만 Dropdown으로 변경 요청 드려도 좋을 것 같아요!
Summary
To Reviewers
Dropdown
컴포넌트 위치를 직접 조정했다면, 리팩토링을 통해 trigger 요소와 결합해 작성 가능하도록 구현했어요.useDisclosure
useClickAway
usePosition
usePosition
hook 내부에서 ref(triggerRef
)를 생성하지 않고, 기존 ref를 사용하고 싶다면defaultTriggerRef
prop을 사용하면 돼요.How To Test